package com.wwl.cms.utils.designModeTest.command;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/9/9 15:10
 * @description:
 */
public class LightOffCommand implements Command {
    //聚合LightReceiver
    LightReceiver light;
    //构造器
    public LightOffCommand(LightReceiver light){
        super();
        this.light=light;
    }
    @Override
    public void execute(){
        //调用接收者的方法
        light.off();
    }
    @Override
    public void undo(){
        light.off();
    }
}
